
clear; clc;
dataName = {'bbcnewssport_737n_1000d_5c_uni_12k', 'COIL20_1440n_1024d_20c_uni_12k',...
              'k1b_2340n_21839d_6c_tfidf_uni_12k',...
                'Lung_203n_3312d_5c_uni_12k', 'lymphoma_96n_4026d_9c_12k',...
                 'RELATHE_1427n_4322d_2c_tfidf_uni_12k', 'SMK_CAN_187n_19993d_2c_12k',...
                'TOX_171n_5748d_4c_zscore_12k', 'uspst_uni_12k'};     
for i1 = 1:length(dataName)
    load(fullfile(pwd, '..', 'data', dataName{i1}));
    Ks2 = zeros(size(Ks));
    for i2 = 1:size(Ks,3)
        Ktmp = knorm(Ks(:,:,i2));
        if max(Ktmp(:)) > 1
            Ktmp = Ktmp  / max(Ktmp(:));
        end
        Ks2(:,:,i2) = Ktmp;
    end
    clear Ks;
    nRepeat = 1;
    [bstResult1, timeElapsed1, res_rmsc_aio] = RMSC_single_dataset(Ks2, Y, nRepeat);
    save([dataName{i1}, '_rmsc_multi_kernel.mat'],  'res_rmsc_aio','timeElapsed1');
end